package co.gov.medellin.ssti.sub.model.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import co.gov.medellin.ssti.sub.model.dao.SecretariaDAO;
import co.gov.medellin.ssti.sub.model.dao.exception.DAOException;
import co.gov.medellin.ssti.sub.model.service.SecretariaService;
import co.gov.medellin.ssti.sub.model.vo.AreaVO;

@Service
public class SecretariaServiceImpl implements SecretariaService {
	@Autowired
	SecretariaDAO secretariaDAOImpl2;

	public List<AreaVO> loadAllSecretarias() throws DAOException {
		try {
			return secretariaDAOImpl2.loadAllSecretarias();
		} catch (Exception e) {
			throw new DAOException(e);
		}
	}

	public List<AreaVO> loadSecretariasByUser(String strCodeUsu) {
		try {
			return secretariaDAOImpl2.loadSecretariasByUser(strCodeUsu);
		} catch (Exception e) {
			throw new DAOException(e);
		}
	}

}
